package com.daz.student.download.action;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import oracle.net.aso.q;

import org.springframework.beans.factory.annotation.Autowired;

import com.daz.common.publicDict.pojo.publicDictPojo;
import com.daz.student.pojo.studentPojo;
import com.daz.student.server.IStudentServer;
import com.daz.teacher.uploadFile.pojo.uploadFilePojo;
import com.daz.teacher.uploadFile.server.iUploadFileServer;
import com.github.pagehelper.PageInfo;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;
public class DownlaodAction extends ActionSupport{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	@Autowired
	private iUploadFileServer downloadServer;
	private String teacherId;
    private PageInfo<uploadFilePojo> fileList;
    private String limit;
    private String page;

	public String getFileListByteachId(){
		int s=0;
		int l=0;
		if(page!=null){
			s = Integer.parseInt(page);
		}
		if(limit != null){
			l = Integer.parseInt(limit);
		}
		
		Map<String, Object> searchconditionMap = new HashMap<String, Object>();
		searchconditionMap.put("teacherId", teacherId);
		try {
			fileList = downloadServer.searchFile(searchconditionMap, s, l);
		} catch (Exception e) {
			
			e.printStackTrace();
		}
		return SUCCESS;
	}

	public String getLimit() {
		return limit;
	}

	public void setLimit(String limit) {
		this.limit = limit;
	}

	public String getPage() {
		return page;
	}

	public void setPage(String page) {
		this.page = page;
	}

	public String getTeacherId() {
		return teacherId;
	}

	public void setTeacherId(String teacherId) {
		this.teacherId = teacherId;
	}

	public PageInfo<uploadFilePojo> getFileList() {
		return fileList;
	}

	public void setFileList(PageInfo<uploadFilePojo> fileList) {
		this.fileList = fileList;
	}
	
	
}


